"""
工具类,存放常用方法
"""
from pathlib import Path
import os
import os.path

class Tools():

    def __init__(self):
        pass

    def get_filepath(self, modulepath='Data', filepath=None, filename='extract.yml'):
        localpath = str(Path(__file__).resolve().parent.parent)
        if filepath:
            url=os.path.join(localpath,modulepath,filepath,filename)
            # url = localpath + '/' + modulepath + '/' + filepath + '/' + filename
        else:
            url = os.path.join(localpath, modulepath, filename)
            # url = localpath + '/' + modulepath + '/' + filename
        return url


if __name__ == '__main__':
    tool=Tools()
    print(tool.get_filepath())